<?php

class CodeSpace_Theme_View_Helper_Theme extends Zend_View_Helper_Abstract
{
    protected $_theme = null;
       
    public function theme($file = null)
    {
        if($file==null){
            return $this;
        }
        return $this->view->baseUrl('themes/'. $this->_theme . '/' . $file);
    }
    
    public function setTheme($base)
    {
        $this->_theme = rtrim($base, '/\\');
        return $this;
    }
    
}
